<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<script language="javascript" type="text/javascript">
function submitForm(){
	$("#dateRange").val($("#year").val() + "-" + $("#month").val());
	$("#form1").submit();
}

function searchFor(whichDay){
	$("#ids").val($("#" + whichDay).val());
	//alert($("#ids").val());
	$("#form2").submit();
}

$(document).ready(function(){
	$("#year").val("${thisYear}");
	$("#month").val("${thisMonth}");
});
</script>
<form class="form-inline" id="form1" action="" method="post">
时间选择：
<select id="year">
		<option value="2010">2010</option>
		<option value="2011">2011</option>
		<option value=2012>2012</option>
		<option value="2013">2013</option>
		<option value="2014">2014</option>
		<option value="2015">2015</option>
		<option value="2016">2016</option>
		<option value="2017">2017</option>
		<option value="2018">2018</option>
		<option value="2019">2019</option>
		<option value="2020">2020</option>
		</select>&nbsp;年&nbsp;
		<select id="month">
		<option value="01">1</option>
		<option value="02">2</option>
		<option value="03">3</option>
		<option value="04">4</option>
		<option value="05">5</option>
		<option value="06">6</option>
		<option value="07">7</option>
		<option value="08">8</option>
		<option value="09">9</option>
		<option value="10">10</option>
		<option value="11">11</option>
		<option value="12">12</option>
		</select>&nbsp;月&nbsp;
		<input type="hidden" value="" id="dateRange" name="dateRange"/>
		<button type="button" class="btn" id="button" onclick="submitForm()">查询</button>
</form>
<form id="form2" action="lostList.do" method="post">
<input type="hidden" name="ids" id="ids" value=""/>
<input type="hidden" value="${thisYear}-${thisMonth}" id="dateRange1" name="dateRange1"/>
</form>
<form id="form3" action="reVisitChart.do" method="post">
<input type="hidden" value="${thisYear}-${thisMonth}" id="dateRange2" name="dateRange2"/>
<button type="submit" class="btn" id="goChart">查看图表</button>
</form>
<table class="table table-bordered">
  <thead>
    <tr>	 	 	 	 	 	 	 							 	
      <th>累计天数</th>
      <th>登录人数</th>
    </tr>
  </thead>
  <tbody>
  <c:forEach var="m" items="${list}">
    <tr>
      <td>${m.keyStr}</td>
      <td><a href="javascript:void(0);" onclick="searchFor('${m.keyStr}');">${m.people}</a></td>
      <input type="hidden" id="${m.keyStr}" value="${m.idStr}"/>
    </tr>
  </c:forEach>
  </tbody>
</table>
</body>
</html>